package org.joy;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;

public class RedissonClientDemo {

    public static void main(String[] args) {
//        Config config = new Config();
        Config config = new Config();
//        config.useSingleServer()
//                .setAddress("rediss://132.145.82.185:6379").setSslEnableEndpointIdentification(false);
//        config.useSingleServer()
//                .setAddress("redis://144.24.109.200:26381").setPassword("platmix##123");
        config.useMasterSlaveServers().setMasterAddress("redis://144.24.109.200:26381").addSlaveAddress().setSslEnableEndpointIdentification(false);



//
//        config.useSentinelServers()
//                .setMasterName("platmix-redis-master")
//                .addSentinelAddress("redis://144.24.109.200:26381").setCheckSentinelsList(false).setPassword("platmix##123");
        RedissonClient redisson = Redisson.create(config);
        RedissonClient client = (RedissonClient) Redisson.create(config);
        String a = client.getStream("name").toString();
        System.out.println(a);
    }
}
